package com.oocl.chatSwitch;

import java.awt.Font;
import java.nio.CharBuffer;
import java.util.HashMap;

import javax.swing.JTextArea;

public class ChatBuffer {
	public static HashMap<String,JTextArea> chatBuffer = new HashMap<String, JTextArea>();
	
	public ChatBuffer(){
		
	}
	
	public static JTextArea getChatBuffer(String receive){
		if(chatBuffer.containsKey(receive)){
			return chatBuffer.get(receive);
		}else{
			JTextArea area = new JTextArea(10,20);
			area.setFont(new Font("宋体", Font.BOLD, 16));
			area.setEditable(false);
			chatBuffer.put(receive, area);
			return chatBuffer.get(receive);
		}
	}
}
